<?php

namespace app\v1\controller;

use app\v1\logic\MiniLawyerLogic;
use think\response\Json;

class MiniLawyer extends BaseController
{
    public function getList()
    {
        return successReturn((new MiniLawyerLogic())->getList($this->param));
    }

    /**
     * 律师咨询预下单
     * @return Json
     */
    public function preOrder(): Json
    {
        [$res, $msgOrData] = (new MiniLawyerLogic())->preOrder($this->param, $this->userId);
        if (!$res) return errorReturn(4001, $msgOrData);
        return successReturn($msgOrData);
    }
}